//
//  GoodInfoTableViewCell.m
//  GoodWayClient
//
//  Created by HuiDong on 15/12/8.
//  Copyright © 2015年 HuiDong. All rights reserved.
//

#import "GoodInfoTableViewCell.h"

@interface GoodInfoTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UIImageView *image;
@property (weak, nonatomic) IBOutlet UILabel *discri;
@property (weak, nonatomic) IBOutlet UILabel *money;
@property (weak, nonatomic) IBOutlet UILabel *amount;
@property (weak, nonatomic) IBOutlet UILabel *number;

@end

@implementation GoodInfoTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

+ (instancetype) GoodInfoWithTableView:(UITableView *)tableView
{
    static NSString *identifier = @"cell";
    GoodInfoTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"GoodInfoTableViewCell" owner:nil options:nil] lastObject];
    }
    return cell;
}

- (void)setDic:(NSDictionary *)dic
{
    _dic = dic;
    self.image.image = [UIImage imageNamed:dic[@"image"]];
    self.discri.text = dic[@"discri"];
    self.money.text = dic[@"money"];
    self.amount.text = dic[@"amount"];
    self.number.text = dic[@"number"];
}

@end
